<!-- 行业竞品数据  template -->
<template>
  <div class="mainTable">
    <BaseTable :query="query" :updateItems="updateItems" :optionList="optionList" :methodParam="methodParam" :Btn="Btn"
      menuName="logRecord" pageName="mainTable" />
  </div>
</template>
<script>
import dayjs from "dayjs"
import BaseTable from "../../../table/hyjpsjTable.vue";
export default {
  name: "hyjpsj1",
  data() {
    return {
      //后端人员修改-S
      //查询参数
      query: [
        { prop: "platform", type: "select", placeholder: "请选择平台", value: "天猫", name: "平台", show: true },
        { prop: "dataType", type: "select", placeholder: "请选择数据类别", value: "gmv", name: "数据类别", show: true },
        { prop: "unit", type: "select", placeholder: "请选择时间粒度", value: "日", name: "时间粒度", show: true },
        // {
        //   prop: "searchTime", type: "time", placeholder: "",
        //   value: ['2024-01-01', dayjs(new Date()).format("YYYY-MM-DD")],
        //   name: "查询时间"
        // },
        {
          prop: "beginDate", type: "time", placeholder: "",
          value: dayjs(new Date()).add(-8, "days").format("YYYY-MM-DD"),
          name: "开始时间", show: true
        },
        {
          prop: "endDate", type: "time", placeholder: "",
          value: dayjs(new Date()).add(-1, "days").format("YYYY-MM-DD"),
          name: "结束时间", show: true
        },
      ],
      //增删查改的对象属性
      updateItems: [//edit是回复
        { name: "文件名称", prop: "文件名称", type: "input", disabled: true },
        { name: "上传类型", prop: "上传类型", type: "select" },
        { name: "备注", prop: "备注", type: "textarea" },
        { name: "上传文件", prop: "上传文件", type: "upload" },
      ],
      //增删查改的对象属性的下拉select或者级联cascader
      optionList: {
        unit: [
          { label: "日", value: "日" },
          { label: "周", value: "周" },
          { label: "月", value: "月" },
          { label: "年", value: "年" },
          { label: "自定义", value: "自定义" },
        ],
        platform: [
          { label: "天猫", value: "天猫" },
          { label: "抖音", value: "抖音" },
        ],
        dataType: [
          { label: "gmv", value: "gmv" },
          { label: "热度", value: "heat" },
        ],
      },
      //增删查改方法参数
      methodParam: "getCompetingGmvData",
      //自定义btn功能
      Btn: {
        search: true, //查询按钮
        add: false, //添加按钮
        edit: false, //回复按钮
        detail: false, //详情按钮
        delete: false, //删除按钮
        deletes: false, //批量删除按钮
        export: true, //导出按钮
        templateDownload: false, //模板下载按钮
        upload: false, //上传按钮
      },
      //后端人员修改-E
    };
  },
  components: {
    BaseTable
  },
  created() {
    let _this = this

  }
};
</script>
<style scoped lang="less">
.mainTable {
  background-color: #f1f2f9;
}
</style>